home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 18 / CU Amiga Magazine's Super CD-ROM 18 (1997)(EMAP Images)(GB)[!][issue 1998-01].iso / CUCD / Online / hsc / source / hsclib / skip.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-11-02  |  2.4 KB  |  74 lines

  1. /*
  2.  * This source code is part of hsc, a html-preprocessor,
  3.  * Copyright (C) 1995-1997  Thomas Aglassinger
  4.  *
  5.  * This program is free software; you can redistribute it and/or modify
  6.  * it under the terms of the GNU General Public License as published by
  7.  * the Free Software Foundation; either version 2 of the License, or
  8.  * (at your option) any later version.
  9.  *
  10.  * This program is distributed in the hope that it will be useful,
  11.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.  * GNU General Public License for more details.
  14.  *
  15.  * You should have received a copy of the GNU General Public License
  16.  * along with this program; if not, write to the Free Software
  17.  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  *
  19.  */
  20. /*
  21.  * hsclib/skip.h
  22.  *
  23.  * functions for skipping several things
  24.  *
  25.  */
  26.  
  27. #ifndef HSCLIB_SKIP_H
  28. #define HSCLIB_SKIP_H
  29.  
  30. #include "ugly/utypes.h"
  31. #include "ugly/infile.h"
  32.  
  33. #include "hsclib/hscprc.h"
  34.  
  35. /* options for skip_until_tag(); see "hsclib/skip.c" for explanation */
  36. #define SKUT_NO_SKIP_TAGFOUND    (1<<0)
  37. #define SKUT_NO_CONTENT_TAGFOUND (1<<1)
  38. #define SKUT_CLEAR_CONTENT       (1<<2)
  39. #define SKUT_NO_ANALYSE_TAGS     (1<<3)
  40.  
  41. /* states for eot_reached() */
  42. #define TGST_TAG     0          /* in tag */
  43. #define TGST_REF     1          /* in attribute reference */
  44. #define TGST_QUOTE   2          /* inside single quote */
  45. #define TGST_DQUOTE  3          /* inside double quote */
  46. #define TGST_END    10          /* end reached */
  47. #define TGST_ERR    99          /* error occured */
  48.  
  49. /* states for eoc_reached() TODO: remove this */
  50. #define CMST_TEXT     0         /* after normal text (or inside tag) */
  51. #define CMST_STAR     1         /* after "*" */
  52. #define CMST_TAG      2         /* after "<" */
  53. #define CMST_END     10         /* after "*>" */
  54. #define CMST_ERR     99         /* error occured */
  55.  
  56. #ifndef NOEXTERN_SKIP_H
  57.  
  58. /*
  59.  * global funcs
  60.  */
  61. extern BOOL skip_next_lf(HSCPRC * hp);
  62. extern BOOL skip_hsc_comment(HSCPRC * hp, EXPSTR * content);
  63. extern BOOL skip_hsc_verbatim(HSCPRC * hp, EXPSTR * content);
  64. extern BOOL skip_sgml_special(HSCPRC * hp, EXPSTR * content);
  65.  
  66. extern BOOL skip_until_eot(HSCPRC * hp, EXPSTR * logstr);
  67.  
  68. extern BOOL skip_until_tag(HSCPRC * hp, EXPSTR * content, EXPSTR * tagfound, STRPTR tagstoplist, STRPTR tagnest, ULONG option);
  69.  
  70. #endif /* NOEXTERN_HSCLIB_SKIP_H */
  71.  
  72. #endif /* HSCLIB_SKIP_H */
  73.  
  74.